package com.jeasonzhao.report.vml.contrib;

import com.jeasonzhao.report.vml.base.Line;
import com.jeasonzhao.report.vml.base.Rect;
import com.jeasonzhao.report.vml.base.Shape;
import com.jeasonzhao.report.vml.exception.VMLException;


public class Triangle extends Shape
{
    public Triangle()
    {
        super();
    }

    public boolean prepareHTML()
        throws VMLException
    {
        this.setCoordSize(10,10);
        this.m_attr_v = "m 0 10 l 10 10 5 0 0 10 e";
        this.m_strPathContent = m_attr_v;
        return true;
    }

    public static void main(String[] argv)
        throws Exception
    {
        Triangle t = new Triangle();
        t.setByCenter(100,100,50,50);
        System.out.println(t.getScript());
        System.out.println((new Line(0,0,200,200)).getScript());
        t.setByCenter(100,100,100,100);
        System.out.println(t.getScript());
        System.out.println((new Rect(t.getLeftTop(),t.getSize())).getScript());
    }

}
